package com.dfy.dto;

import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import com.fasterxml.jackson.annotation.JsonProperty;

@Data
public class OrderRequest {
    @NotNull(message = "景点ID不能为空")
    @JsonProperty("spotId")
    private Long spotId;

    @NotNull(message = "预约时间不能为空")
    @JsonProperty("visitDate")
    private String visitDate;

    @NotNull(message = "数量不能为空")
    @Min(value = 1, message = "数量必须大于0")
    @JsonProperty("quantity")
    private Integer quantity;

    @NotBlank(message = "联系人不能为空")
    @JsonProperty("contactName")
    private String contactName;

    @NotBlank(message = "联系电话不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @JsonProperty("contactPhone")
    private String contactPhone;

    @JsonProperty("remark")
    private String remark;
} 